// Author: wsfuyibing <682805@qq.com>
// Date: 2025-06-25

package list

import "server/app/kind"

type Request struct {
	State kind.OrderState `label:"状态位"`
	Page  int
	Size  int
}

func (o *Request) BeforeValidate() (err error) {
	if o.State.IsUndefined() {
		o.State = kind.OrderStateSucceed
	}

	if o.Page < 1 {
		o.Page = 1
	}

	if o.Size < 1 {
		o.Size = 10
	}
	return
}
